The present invention relate to a digital camera and control method for the same, and more specifically to a digital camera capable of controlling each components thereof with a CPU and control method by the CPU.
As a method of correcting the oscillation frequency of a CPU, for instance, there is a method disclosed in Japanese Patent Laid-Open Publication No. HEI 5-75445. As the oscillating element, quartz oscillators, ceramic oscillators, or CR oscillator are commonly used. A quartz oscillator is generally employed to generate the operating frequency of the IPP (Image Pre-Processor) which is a digital signal processing section in a digital camera and the precision of this quartz oscillator is fairly high. On the other hand, a ceramic oscillator is in most cases employed to generate the operating frequency of the CPU because the cost is low as well as a time required for starting oscillation is relatively short. When processing such as taking a picture is to be executed, the timing for each control in the CPU is in many cases set according to a vertical synchronization (vd) signal from the IPP as a starting point. When the timing is to be set in this way, the vertical synchronization signal (vd) is detected by means of interruption or the like, then a timer in the CPU is started at a time when the vertical synchronization signal (vd) is detected, and the processing under consideration is executed when a prespecified period of time passes after starting of the timer.
However, because an expensive quartz oscillator is used in the IPP error in the oscillation frequency is relatively small, on the other hand, because a low-cost ceramic oscillator is used in the CPU error in the oscillation frequency is larger and also the time precision is lower. Therefore, error is disadvantageously generated when the CPU is utilized to decide the timing for starting a control over an object to be controlled according to a vertical synchronization signal (vd) inputted from the IPP.
It is an object of the present invention to provide a digital camera and control method for the same which can prevent generation of error in the timing for starting the control when a CPU is utilized to decide the timing for starting the control of an object according to the inputted vertical synchronization signal.
The digital camera according to the present invention comprises a CPU which controls the operations of the internal components of the digital camera, the CPU having an oscillating element which generates an oscillation frequency; a vertical synchronization signal measuring unit for measuring a cycle of an inputted vertical synchronization signal based on the oscillation frequency generated by the oscillating element; and a correcting unit for correcting the timing of start of control over an object to be controlled based on the measured cycle of the vertical synchronization signal when the timing for start of controls over the object to be controlled is to be decided based on the vertical synchronization signal. When deciding the timing of starting the control of the object based on the vertical synchronization signal as a reference, the object can be controlled by a timing for starting which includes less error.